package screens;

import world.WorldManager;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Buttons;
import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.InputListener;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener.ChangeEvent;
import com.me.jnrgame.JnR;

public class LevelScreen implements Screen {
	WorldManager worldManager;
	OrthographicCamera camera;
	JnR game;
	Stage stage;
	int levelNumber;

	public LevelScreen(int i, JnR _game) {
		super();
		levelNumber = i;
		game = _game;
		camera = _game.getCamera();
		worldManager = new WorldManager(camera, game.getScreenWidth(),
				game.getScreenHeight(), game);
		stage = worldManager.getStage();

		worldManager.loadWorld(i);

	}

	public int getLevelID() {
		return levelNumber;
	}

	@Override
	public void render(float delta) {

	}

	@Override
	public void resize(int width, int height) {
		// TODO Auto-generated method stub

	}

	@Override
	public void show() {
		// TODO Auto-generated method stub

	}

	@Override
	public void hide() {
		// TODO Auto-generated method stub

	}

	@Override
	public void pause() {
		// TODO Auto-generated method stub

	}

	@Override
	public void resume() {
		// TODO Auto-generated method stub

	}

	@Override
	public void dispose() {
		// TODO Auto-generated method stub

	}

	public WorldManager getWorldAssitant() {

		return worldManager;

	}

	public Stage getStage() {

		return stage;
	}

	public void removeHUDButtons() {
		if (stage.getActors().size != 0)
			stage.clear();
	}

	public void addHUDButtons() {

		worldManager.addHUD();
	}
}
